<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>半屏小程序</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  {include file="public/css"/}
</head>
<body>
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-card layui-col-md12">
				<div class="layui-card-header">
					<i class="fa fa-plus">申请授权半屏小程序</i> 
					<i class="layui-icon layui-icon-close" style="font-size:18px;font-weight:bold;cursor:pointer" onclick="closeself()"></i>
				</div>
				<div class="layui-card-body" pad15>
					<div class="layui-form form-label-w6" lay-filter="">
						
						<div class="layui-form-item">
							<label class="layui-form-label">小程序AppID：</label>
							<div class="layui-input-inline">
								<input type="text" name="info[appid]" value="{$info.appid}" lay-verify="required" lay-verType="tips" autocomplete="off" class="layui-input" >
							</div>
							<div class="layui-form-mid layui-word-aux">需要申请授权跳转的目标小程序的AppID</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label">申请理由：</label>
							<div class="layui-input-inline">
								<input type="text" name="info[apply_reason]" value="{$info.apply_reason}" lay-verify="required" lay-verType="tips" autocomplete="off" class="layui-input" >
							</div>
						</div>
						
						<div class="layui-form-item">
							<label class="layui-form-label"></label>
							<div class="layui-input-block">
								<button class="layui-btn" lay-submit lay-filter="formsubmit">提 交</button>
							</div>
						</div>
					</div>
				</div>
			</div>
    </div>
  </div>
	{include file="public/js"/}
	<script>
	layui.form.on('submit(formsubmit)', function(obj){
		var field = obj.field
		var index = layer.load();
		$.post("{:url('save')}",field,function(data){
			layer.close(index);
			dialog(data.msg,data.status);
			if(data.status == 1){
				setTimeout(function(){
					parent.layer.closeAll();
					parent.tableIns.reload()
				},1000)
			}
		})
	});
	
	var chooseUrlField = '';
	function chooseUrl2(field){
		chooseUrlField = field;
		layer.open({type:2,shadeClose:true,area:['1100px', '650px'],'title':'选择链接',content:"{:url('DesignerPage/chooseurl')}&callback=chooseLink2"})
	}
	function chooseLink2(urlname,url){
		$("#"+chooseUrlField).val(url);
		$("#urlname").val(urlname);
	}
  </script>
	{include file="public/copyright"/}
</body>
</html>